#!/usr/bin/env bash
# 实例文件：strvsnum
#
# 老生常谈的字符串与数值比较
#
VAR1=" 05 "
VAR2="5"
printf "%s" "do they -eq as equal? "

if [ "$VAR1" -eq "$VAR2" ]
then
    echo YES
else
    echo NO
fi

printf "%s" "do they = as equal? "
if [ "$VAR1" = "$VAR2" ]
then
    echo YES
else
    echo NO
fi

## -lt		<		小于
## -le		<=		小于等于
## -tg		>		大于
## -ge		>=		大于等于
## -eq		=, ==		等于
## -ne		!=		不等于
